from DrissionPage import ChromiumPage, ChromiumOptions


def page_get(local_port=9222, user_data_path=r'C:\Users\79100\AppData\Local\Google\Chrome\User Data'):
    co = ChromiumOptions()
    co.set_paths(local_port=local_port, user_data_path=user_data_path)
    # co.headless(True)
    page = ChromiumPage(co)
    page.set.auto_handle_alert()
    page.set.when_download_file_exists('overwrite')
    return page
